package chapter04;
//定义抽象类Animal

abstract class Animal{
    //定义抽象类shout()
    abstract void shout();
}

class DOg extends Animal{
    void shout(){
        System.out.println("汪汪");
    }
}
//定义测试类
public class example10 {
    public static void main(String[] args) {
        DOg dog = new DOg();
        dog.shout();      //调用dog对象的shout()方法
    }
}
